package com.risenb.constant;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpSession;

import org.springframework.context.ApplicationContext;

/**
 * @author  jing
 */
public class Const {
	// 短信平台账号
	public static final String server_username = "wdbc";
	// 短信平台密码
	public static final String server_password = "Wdbc1637";
	// 加密串
	public final static String ENCODE_KEY = "1234567890123456";
	// 系统错误
	public final static String SYSERROR = "系统错误";
	// 验证码有效时间10分
	public final static int MINUTE = 10;
	// 每页显示条数
	public static final String PAGESIZE = "10";
	//友盟安卓推送Appkey
	public static final String uMengAndroidappkey = "56f24c4267e58eab0c001149";
	//友盟安卓推送appMasterSecret
	public static final String uMengAndroidappMasterSecret = "srxocp4bp0fnrheevtmvh1hzmcffnnbx";
	//友盟IOS推送Appkey
	public static final String uMengIOSappkey = "";
	//友盟IOS推送appMasterSecret
	public static final String uMengIOSappMasterSecret = "";
	public static final String COOKIE_USER_NAME="useremail";
	public static final String SESSION_SECURITY_CODE = "sessionSecCode";
	public static final String SESSION_USER = "sessionUser";
	// PC用户端session
	public static final String SESSION_CLIENT_USER = "clientuser";
	public static final String SESSION_CLIENT_CUSTOMER = "customeruser";
	public static final String SESSION_MANAGER = "sessionManager";
	public static final String SESSION_MANAGER_ROLE = "sessionManagerRole";
	public static final String NO_INTERCEPTOR_PATH_MANAGE = ".*/((manage/login)|(manage/logout)|(manage/index)|(upload/file)|(m2/toCpPassword)|(m2/cp)|(file_upload)).*";	//不对匹配该值的访问路径拦截（正则）後台
	public static final String NO_INTERCEPTOR_PATH_client = ".*/((redirect)|(city)|(county)|(home/home)).*";	//不对匹配该值的访问路径拦截（正则）前台
	public static final String NO_INTERCEPTOR_PAGE = ".*/((client/index)).*";	//不对匹配该值的访问路径拦截（正则）前台
	public static final String CHECK_CODE = "checkcode";
	public static final String CLIENT_CHECK_CODE = "clientcheckcode";
	public static final String NO_INTERCEPTOR_PATH = ".*/((login)|(logout)|(code)).*";	//不对匹配该值的访问路径拦截（正则）後台
	public static ApplicationContext WEB_APP_CONTEXT = null; //该值会在web容器启动时由WebAppContextListener初始化
	public static ServletContext SERVLET_CONTEXT = null;
	public static final String ManagerName = "系统管理员";//系统管理员名称
	
	public static final int ManagerId = 1;//系统管理员ID
	/** 
	 * 用户和Session绑定关系 
	 */  
	public static final Map<String, HttpSession> USER_SESSION=new HashMap<String, HttpSession>();
	
	
	/** 
	 * seeionId和用户的绑定关系 
	 */  
	public static final Map<String, String> SESSIONID_USER=new HashMap<String, String>();
	// 默认头像
	public static final String HEADIMG = "/client/imgs/g_55.png";
	
	public static String UPLOADDIRECTORY="D:/apache-tomcat-8.0.35/webapps/risenb-manager-web/upload/";//上传返回的目录
	public static String HOST="http://localhost:8080/upload/";//上传返回的目录
	
}
